package com.salton123.feature;

import android.os.Looper;

/**
 * User: newSalton@outlook.com
 * Date: 2020/1/10 10:04
 * ModifyTime: 10:04
 * Description:
 */
public abstract class IdleHandlerFeature implements IFeature {

    @Override
    public void onBind() {
        Looper.myQueue().addIdleHandler(() -> {
            doOnQueueIdle();
            return false;
        });
    }

    @Override
    public void onUnBind() {

    }

    abstract void doOnQueueIdle();
}
